/*
  Travis Tarr
  CS362-400
  
  Assignment #3
  
  Testing the village cardEffect
  +1 card, +2 actions
  
  int cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos,
                  int *bonus)
*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

void testVillage() {
  int i;
  int seed = 1000;
  int numPlayer = 2;
  int maxBonus = 10;
  int p, r, handCount;
  int bonus;
  int k[10] = {adventurer, council_room, feast, gardens, mine
	       , remodel, smithy, village, baron, great_hall};
  struct gameState G;
  int maxHandCount = 5;
  int actions;
  
  
  printf ("TESTING village cardEffect():\n");
	
  memset(&G, 23, sizeof(struct gameState));   // clear the game state
  r = initializeGame(numPlayer, k, seed, &G); // initialize a new game
  
  handCount = G.handCount[0];
  actions = G.numActions;
  if(cardEffect(village, -1, -1, -1, &G, 0, 0) == 0) {
    if((G.handCount[0] == handCount + 1) && (G.numActions == actions + 2)) {
      printf("testVillage(): PASSED when testing village cardEffect.\n");
    } else {
      printf("testVillage(): FAILED when testing village cardEffect.\n");
    }
  } 

}

int main() {
	testVillage();
	return 0;
}
